using ModelLayer;
using System.Collections.Generic;

namespace DataAccessObjectLayer
{
    internal interface IDBCustomer
    {
        /// <summary>
        /// Gets all customers from the database
        /// </summary>
        List<Customer> GetAllCustomer();

        /// <summary>
        /// Gets a customer from the database.
        /// </summary>
        /// <param name="personId">The person identifier.</param>
        /// <returns>Customer.</returns>
        Customer GetCustomer(long personId);

        /// <summary>
        /// Inserts the customer in the database.
        /// </summary>
        /// <param name="customer">The customer.</param>
        /// <returns>number of affected rows in the database</returns>
        /// <exception cref="System.Exception">The Customer was not inserted</exception>
        int InsertCustomer(Customer customer);

        /// <summary>
        /// Updates a customer in the database.
        /// </summary>
        /// <param name="customer">The customer.</param>
        /// <returns>number of affected rows in the database</returns>
        /// <exception cref="System.Exception">The Customer was not updated</exception>
        int UpdateCustomer(Customer customer);

        /// <summary>
        /// Deletes a customer from the database
        /// </summary>
        /// <param name="customerId">The customer identifier.</param>
        /// <returns>number of affected rows in the database</returns>
        /// <exception cref="System.Exception">The Customer was not deleted</exception>
        int DeleteCustomer(long customerId);
    }
}